/*
 * Filename TestStripPriceProfitClient.java 2022年03月24日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 * @author wuyingchao
 */
package com.ehome.poct.core.api.feign;

import com.ehome.poct.core.api.dto.check.gold.TestConfPoctStripTypeDTO;
import com.ehome.poct.core.api.dto.order.TestStripPriceProfitDTO;
import com.ehome.poct.core.api.dto.report.ProfitDTO;
import com.ehome.poct.core.api.qry.ProfitPlanQry;
import com.ehome.poct.core.api.vo.order.TestStripPriceProfitVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author wyc
 * @since 2022/03/24 15:51
 **/
@FeignClient(value = "${service.poct-core:}${service.suffix.poct-core:}",path="/profits",contextId = "TestStripPriceProfitClient")
public interface TestStripPriceProfitClient {

    @GetMapping("/one")
    TestStripPriceProfitVO getOne(@SpringQueryMap ProfitPlanQry qry);

    /**
     * 金标仪所有检测项
     * @return
     */
    @GetMapping("/getDetections")
    List<TestConfPoctStripTypeDTO> getDetections();

    /**
     * 新增价格方案详情
     * @param dto
     */
    @PostMapping
    TestStripPriceProfitVO addProfit(TestStripPriceProfitDTO dto);

    /**
     * 获取价格方案详情
     * @param dto
     * @return
     */
    @GetMapping("?sortColumns=stripTypeCode")
    List<TestStripPriceProfitVO> list(@SpringQueryMap TestStripPriceProfitDTO dto);

    /**
     * 根据id修改价格利润
     * @param id
     * @param profitDTO
     */
    @PatchMapping({"/{id}"})
    void updateById(@PathVariable(value = "id") Long id,@RequestBody ProfitDTO profitDTO);

    /**
     * 删除价格方案原有价格项
     * @param profitSchemeId
     */
    @DeleteMapping("deleteProfitById/{profitSchemeId}")
    void deleteProfitById(@PathVariable Long profitSchemeId);
}